﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/RopaOnline.Master" AutoEventWireup="true" CodeBehind="CompanySendingSearch.aspx.cs" Inherits="Upsam.RopaOnline.Web.CompanySending" %>
<asp:Content ID="cntHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="cntContext" ContentPlaceHolderID="cphContext" runat="server">
<div>
<fieldset style="width: 98%; float: left; margin-top: 10px;">
			<legend>Búsqueda Conpañía Envio</legend>
			<div style="width: 98%; float: left; margin-top: 10px;">
				<div style="width: 48%; float: left; padding-left: 10px;">
					<asp:Label ID="lblCompanySendingName" runat="server" Text="Empresa Envio" AssociatedControlID="txtCompanySendingName"></asp:Label>
				</div>
				<div style="width: 48%; float: left; padding-left: 10px;">
					<asp:TextBox ID="txtCompanySendingName" runat="server" Width="98%"></asp:TextBox>
				</div>
			</div>
			<div style="width: 98%; float: left; margin-top: 10px;">
				<div style="width: 48%; float: left; padding-left: 10px;">
					<asp:Label ID="lblTelephone" runat="server" Text="Telefóno" AssociatedControlID="txtTelephonee"></asp:Label>
				</div>
				<div style="width: 48%; float: left; padding-left: 10px;">
					<asp:TextBox ID="txtTelephone" runat="server" Width="98%"></asp:TextBox>
				</div>
			</div>
			<div style="width: 98%; float: left; margin-top: 10px;">
				<div style="width: 48%; float: left; padding-left: 10px;">
					<asp:Label ID="lblEmail" runat="server" Text="Email" AssociatedControlID="txtEmail"></asp:Label>
				</div>
				<div style="width: 48%; float: left; padding-left: 10px;">
					<asp:TextBox ID="txtEmail" runat="server" Width="98%"></asp:TextBox>
				</div>
			</div>			
			<div style="width: 98%; float: left; margin-top: 10px; text-align: center; margin-bottom: 10px;">
				<asp:Button ID="btnSearch" runat="server" Text="Buscar" OnClick="btnSearch_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
				<asp:Button ID="btnAdd" runat="server" Text="Agregar" OnClick="btnAdd_Click" />
			</div>
		</fieldset>
		<div style="width: 98%; float: left; height: auto; margin-top: 10px;">
			<div style="width: 98%; float: left; margin-bottom: 10px;">
				Resultado</div>
            <asp:GridView ID="grvCompanySending" runat="server" AllowPaging="True" 
                AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
                BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                DataKeyNames="IdEmpresaEnvio" DataSourceID="ldsCompanySending" 
                GridLines="Horizontal">
                <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                <Columns>
                <asp:ButtonField ButtonType="Link" CommandName="EditItem" CausesValidation="false"
						Text="Editar" />
                    <asp:CommandField ShowDeleteButton="True" />
                    <asp:BoundField DataField="IdEmpresaEnvio" HeaderText="IdEmpresaEnvio" 
                        InsertVisible="False" ReadOnly="True" SortExpression="IdEmpresaEnvio" />
                    <asp:BoundField DataField="EmpresaEnvio1" HeaderText="EmpresaEnvio1" 
                        SortExpression="EmpresaEnvio1" />
                    <asp:BoundField DataField="Telefono" HeaderText="Telefono" 
                        SortExpression="Telefono" />
                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                    <asp:BoundField DataField="IdDireccion" HeaderText="IdDireccion" 
                        SortExpression="IdDireccion" />
                </Columns>
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                <AlternatingRowStyle BackColor="#F7F7F7" />
            </asp:GridView>
            <asp:LinqDataSource ID="ldsCompanySending" runat="server" 
                ContextTypeName="Upsam.RopaOnline.Modelo.Data.RopaOnLineDataContext" 
                EnableDelete="True" OrderBy="EmpresaEnvio1" TableName="EmpresaEnvios" 
                Where="EmpresaEnvio1 == @EmpresaEnvio1 &amp;&amp; Email == @Email &amp;&amp; Telefono == @Telefono">
                <WhereParameters>
                    <asp:ControlParameter ControlID="txtCompanySendingName" Name="EmpresaEnvio1" 
                        PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="txtEmail" Name="Email" PropertyName="Text" 
                        Type="String" />
                    <asp:ControlParameter ControlID="txtTelephone" Name="Telefono" 
                        PropertyName="Text" Type="String" />
                </WhereParameters>
            </asp:LinqDataSource>
</div>

</asp:Content>
